//
//  XLSUtils.swift
//  PPChecker
//
//  Created by Zhang Zhang on 16/8/7.
//  Copyright © 2016年 foss. All rights reserved.
//

import Foundation

public class XLSUtils{

    
    static let instance = XLSUtils()
    
    public func test(){
        
        let path: String = NSBundle.mainBundle().pathForResource("PMSDemo", ofType: "xlsx")!
        let spreadsheet: BRAOfficeDocumentPackage = BRAOfficeDocumentPackage.open(path)
 
        spreadsheet.workbook.worksheets.forEach { (sheet) in
            
            if let _sheet = sheet as? BRAWorksheet {
                
                _sheet.cells.forEach({ (cell) in
                   
                    if let _cell = cell as? BRACell {
                        print(" cell = \(_cell.stringValue())")
                    }
                })
                
            }
        }
        
        
    }
}
